<template>
	<view class="padb30">
		<stop isBack>
			<block slot="content">修改密码</block>
			<block slot="backText">返回</block>
		</stop>
		<view class=" mart3">
			<spassword v-model="en.old" label="原密码" placeholder="请输入新密码"></spassword>
			<spassword v-model="en.password" label="新密码" placeholder="请输入新密码"></spassword>
			<spassword v-model="en.passwordag" label="新密码" placeholder="请再次输入新密码"></spassword>
			<view class="bdtso bcf pad3">
				<view class="cu-btn lg round line-green w100 pos-r" @tap="submit"> 确认修改  <ripple></ripple> </view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				en:{
					old:'',
					password:'',
					passwordag:'',
				},
			}
		},
		methods: {
			submit(){
				
					this.$api.post(
						'/app/change/password',this.en,
						(res) => {
							this.log(res)
							if(res.s == 1){
								setTimeout(()=>{
									// this.$win.gointo('/pages/stream/index/index')
									this.$win.goback()
								},500)
							}
							this.$com.showToast(res.i)
						})
			}
		},
		created() {
		},
		onLoad(option){
			
		}
	}
</script>

<style>

</style>
